
struct Material
{
    float3 kd;
    bool useBump;
    float4 ka;
    float4 ks; // w = 镜面反射强度
};
    // 默认列主矩阵，传入进来需要转置
cbuffer CBPerObj : register(b0)
{
    float4x4 gWorld;            
    float4x4 gInvTransWorld;
    Material gMaterial;
    int gId[4];//[0]是否灯光，[1],灯光编号
};

cbuffer CBPerFrame : register(b1)
{
    float4x4 g_View;
    float4x4 g_Proj;
    float3 gCamPos;
    float pad;
}

